package xyz.zq.sf.common.log.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import xyz.zq.sf.common.log.annotation.SysLog;

/**
 * @author hzq
 * @date 2021-02-04 16:53
 */
@Slf4j
public class SysLogListener implements ApplicationListener<SysLogEvent> {

    @Async
    @Override
    public void onApplicationEvent(SysLogEvent event) {
        /*处理日志*/
        SysLog source = (SysLog) event.getSource();

        log.info(source.value());
    }
}
